package cn.zsb.proxy.jProxy;

public class TeacherDaoProxy implements TeacherDao {

    private  TeacherDaoImpl  target= null;

    public TeacherDaoProxy(TeacherDaoImpl teacherDaoImpl) {
        this.target = teacherDaoImpl;
    }

    @Override
    public void teach() {
        System.out.println("静态代理开始");
        target.teach();//执行目标对象的方法
        System.out.println("静态代理结束");
    }
}
